import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import ArticalManage from '@/components/ArticalManager/ArticalManage'
import TagManager from '@/components/ArticalManager/TagManager'
import ArticalManager from '@/components/ArticalManager/ArticalManager'
import NoteManager from '@/components/ArticalManager/NoteManager'
// import SimpleUploader from '@/components/ArticalManager/SimpleUploader'
import CategoryManage from '@/components/ArticalManager/CategoryManage'
import AuthorManage from '@/components/ArticalManager/AuthorManage'
import OxfordDict from '@/components/OxfordDict/OxfordDict'
import Word from '@/components/OxfordDict/Word'
import Notes from '@/components/Notes/Notes'
import Note from '@/components/Notes/Note'
import Photography from '@/components/Photography/Photography'
import BPB from '@/components/BPB/BPB'
import Overview from '@/components/BPB/Overview'

Vue.use(Router)

export default new Router({
  // mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/Home',
      name: 'Home1',
      component: Home
    },
    {
      path: '/admin',
      name: 'ArticalManage',
      component: ArticalManage,
      children: [
        {
          path: 'articals',
          component: ArticalManager
        },
        {
          path: 'tags',
          component: TagManager
        },
        {
          path: 'categories',
          component: CategoryManage
        },
        {
          path: 'authors',
          component: AuthorManage
        },
        {
          path: 'notes',
          component: NoteManager
        }
      ]
    },
    {
      path: '/notes',
      name: 'Notes',
      component: Notes
    },
    {
      path: '/notes/:title',
      name: 'Note',
      component: Note
    },
    {
      path: '/dict',
      name: 'OxfordDict',
      component: OxfordDict,
      children: [
        {
          path: ':word',
          component: Word
        }
      ]
    },
    {
      path: '/photo',
      name: 'Photography',
      component: Photography
    },
    {
      path: '/bpb',
      name: 'BPB',
      component: BPB,
      children: [
        {
          path: 'overview',
          name: 'Overview',
          component: Overview
        }
      ]
    }
  ]
})
